package com.naiterui.ehp.bp.utils.event;

import org.springframework.context.ApplicationEvent;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author gaoliangliang
 * @date 2019-06-20 14:50
 * @since 1.0.0
 */
@Getter
@Setter
@ToString
public class BizEvent<T> extends ApplicationEvent {

    public static final int EVENT_TYPE_WXMSG = 1;
    public static final int EVENT_TYPE_PUBLISHMSG = 2;
    public static final int EVENT_TYPE_BIZCONFIG = 3;
    /**
     * 微信小程序消息
     */
    public static final int EVENT_TYPE_WXMAMSG = 4;

    private int eventTopic;
    protected T eventData;

    public BizEvent(Object source) {
        super(source);
    }

    public BizEvent(Object source, T eventData, int eventTopic) {
        super(source);
        this.eventData = eventData;
        this.eventTopic = eventTopic;
    }

}
